package com.haikesi.api.loginlog.domain.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;


@ApiModel(description = "查询参数")
@Data
@EqualsAndHashCode(callSuper = false)
public class LoginLogSearchVO implements Serializable {
    private static final long serialVersionUID = -1L;

    @ApiModelProperty(value = "登陆IP", hidden = false)
    private String logIp;

    @ApiModelProperty(value = "登录地区", hidden = false)
    private String loginRegion;

    @ApiModelProperty(value = "操作人", hidden = false)
    private String loginName;


    @ApiModelProperty(value = "页数")
    private Integer pageNum;
    @ApiModelProperty(value = "每页行数")
    private Integer pageSize;

    public Integer getPageNum() {
        if(pageNum == null){
            pageNum = 1;
        }
        return pageNum;
    }
    public Integer getPageSize() {
        if(pageSize == null){
            pageSize = 20;
        }
        if(pageSize > 100){
            pageSize = 100;
        }
        return pageSize;
    }
}